/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.sigawe.SIASDIT.dao.model;

/**
 *
 * @author RAHMAN
 */
public class File {

    String KEY;
    String KEY1;
    String KEY2;
    String KEY3;
    String KEY4;
    String KEY5;
    String KEY6;
    String KEY7;
    String KEY8;
    private final int NIM = 8;

    public File() {
    }

    public String getKEY1() {
        return KEY1;
    }

    public void setKEY1(String KEY1) {
        this.KEY1 = KEY1;
    }

    public String getKEY() {
        return KEY;
    }

    public void setKEY(String KEY) {
        this.KEY = KEY;
    }

    public String getKEY2() {
        return KEY2;
    }

    public void setKEY2(String KEY2) {
        this.KEY2 = KEY2;
    }

    public String getKEY3() {
        return KEY3;
    }

    public void setKEY3(String KEY3) {
        this.KEY3 = KEY3;
    }

    public String getKEY4() {
        return KEY4;
    }

    public void setKEY4(String KEY4) {
        this.KEY4 = KEY4;
    }

    public String getKEY5() {
        return KEY5;
    }

    public void setKEY5(String KEY5) {
        this.KEY5 = KEY5;
    }

    public String getKEY6() {
        return KEY6;
    }

    public void setKEY6(String KEY6) {
        this.KEY6 = KEY6;
    }

    public String getKEY7() {
        return KEY7;
    }

    public void setKEY7(String KEY7) {
        this.KEY7 = KEY7;
    }

    public String getKEY8() {
        return KEY8;
    }

    public void setKEY8(String KEY8) {
        this.KEY8 = KEY8;
    }

    public boolean isValidDelete() {
        boolean valid = false;
        if (this.getKEY() != null && (!this.getKEY().equalsIgnoreCase("")) && this.getKEY1() != null && (!this.getKEY1().equalsIgnoreCase("")) && this.getKEY2() != null && (!this.getKEY2().equalsIgnoreCase("")) && (this.getKEY2().length() == NIM) && this.getKEY3() != null && (!this.getKEY3().equalsIgnoreCase(""))) //         if(key!= null && slot!= null && nim != null && pin != null)   
        {
            valid = true;

        }
        System.out.println("VALIDASI ISI " + valid);
        return valid;
    }

    public boolean isValidInput() {
        boolean valid = false;
        if (this.getKEY() != null && (!this.getKEY().equalsIgnoreCase("")) && this.getKEY1() != null && (this.getKEY1().length() == NIM) && (!this.getKEY1().equalsIgnoreCase("")) && this.getKEY2() != null && (!this.getKEY2().equalsIgnoreCase("")) && this.getKEY3() != null && (!this.getKEY3().equalsIgnoreCase("")) && this.getKEY4() != null && (!this.getKEY4().equalsIgnoreCase("")) && this.getKEY5() != null && (!this.getKEY5().equalsIgnoreCase("")) && this.getKEY6() != null && (!this.getKEY6().equalsIgnoreCase("")) && this.getKEY7() != null && (!this.getKEY7().equalsIgnoreCase(""))) //         if(key!= null && slot!= null && nim != null && pin != null)   
        {
            valid = true;

        }
        return valid;
    }

    public boolean isValidLihat() {
        boolean valid = false;
        if (this.getKEY() != null && (!this.getKEY().equalsIgnoreCase("")) && this.getKEY1() != null && (this.getKEY1().length() == NIM) && (!this.getKEY1().equalsIgnoreCase("")) && this.getKEY2() != null && (!this.getKEY2().equalsIgnoreCase(""))) {
            valid = true;
        }
        return valid;
    }

    public boolean isValidRegis() {
        boolean valid = false;
        if (this.getKEY() != null && (!this.getKEY().equalsIgnoreCase("")) && this.getKEY1() != null && (!this.getKEY1().equalsIgnoreCase("")) && this.getKEY2() != null && (!this.getKEY2().equalsIgnoreCase("")) && this.getKEY3() != null && (!this.getKEY3().equalsIgnoreCase("")) && (this.getKEY3().length() == NIM) && this.getKEY4() != null && (!this.getKEY4().equalsIgnoreCase(""))) {
            valid = true;
        }

        return valid;
    }
}
